package com.neouton.crm.managerPayPlan.mapper;

import com.neouton.crm.managerPayPlan.entity.ManagerPayPlan;
import com.neouton.crm.paymentPlan.entity.PaymentPlan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ManagerPayPlanMapper {

    boolean saveManagerPayPlan(@Param("List")List<ManagerPayPlan> paymentPlanList);

    void backUpManagerPayPlan(@Param("purchaseOrderId") Integer purchaseId, @Param("backUserId")Integer userId);

    void updateManagerPayPlanByIds(@Param("List")List<ManagerPayPlan> paymentPlans, @Param("purchaseId") Integer purchaseId);

    List<ManagerPayPlan> queryManagerPayPlanByPidAndPlanPeriod(@Param("vo")ManagerPayPlan paymentPlan);

    List<PaymentPlan> queryPayPlanBackByPidAndPlanPeriod(@Param("vo")PaymentPlan paymentPlan);

    ManagerPayPlan queryPaymentPlanByPurchaseOrderID(@Param("vo")ManagerPayPlan paymentPlan);

    void updatePayPlansByIdAndPlanPeriod(@Param("list")List<ManagerPayPlan> paymentPlans);
}
